package com.qipay.pay;

import com.qipay.pay.entity.CpPayAlipayNativeRequest;
import com.qipay.pay.entity.CpPayAlipayTradeCloseRequest;
import com.qipay.pay.entity.CpPayAlipayTradeQueryRequest;
import com.qipay.security.jwt.JWTUser;
import org.springframework.transaction.annotation.Transactional;

import java.util.Map;

public interface AlipayService {

    @Transactional
    Map<String, Object> payNative(
            CpPayAlipayNativeRequest entity,
            JWTUser loggedUser) throws Exception;

    @Transactional
    Map<String, Object> tradeClose(
            CpPayAlipayTradeCloseRequest entity,
            JWTUser loggedUser
    ) throws Exception;

    @Transactional
    Map<String, Object> tradeQuery(
            CpPayAlipayTradeQueryRequest entity,
            JWTUser loggedUser) throws Exception;

    @Transactional
    Map<String, Object> nativePay(Long orderId) throws Exception;
}
